<?php
namespace app\user\controller;
use think\Controller;
use think\Request;
class Common extends Controller
{
	//自动获取头信息的KEY
    public function _initialize()
    {
        $key = config('headerkey');
        $requestkey = Request::instance()->header('key');
        $time = Request::instance()->header('time');
        $key = md5($key.$time);

        /*$difference = time() - (int)$time;
        if($requestkey != $key||($difference&&$difference>180)||($difference&&$difference<-180)){
            
            die('非法请求！');
        }*/
    }
}
